set x=src
set y=whatsthatpref
xcopy %x% build /i /e
del build\*.xpi /s /f

rem *** In case these folders aren't in proper place.

xcopy build\content build\chrome\content /i /e
xcopy build\locale build\chrome\locale /i /e
xcopy build\skin build\chrome\skin /i /e
rmdir /s /q build\content
rmdir /s /q build\locale
rmdir /s /q build\skin

rem *** Add in everything outside of the chrome.

cd build
7z a -tzip "%y%.xpi" * -r -mx=9
cd ..

move build\%y%.xpi %y%.xpi

rmdir /s /q build
